setup{ }
start{ }
deploy{
  boolean enableConversation=context.get(Configuration.class).getContainerConfig(WeldEEMockConfiguration.class).isEnableConversationScope();
  ShrinkWrapClassLoader classLoader=new ShrinkWrapClassLoader(archive.getClass().getClassLoader(),archive);
  ContextClassLoaderManager classLoaderManager=new ContextClassLoaderManager(classLoader);
  classLoaderManager.enable();
  TestContainer container=new TestContainer(findArchiveId(archive),findBeansXml(archive),findBeanClasses(archive,classLoader));
  Bootstrap bootstrap=container.getBootstrap();
  context.add(ContextClassLoaderManager.class,classLoaderManager);
  container.startContainer();
  context.add(TestContainer.class,container);
  context.add(Bootstrap.class,bootstrap);
  context.add(WeldManager.class,container.getBeanManager(container.getDeployment().getBeanDeploymentArchives().iterator().next()));
  context.register(AfterDeploy.class,new SessionLifeCycleCreator());
  context.register(BeforeUnDeploy.class,new SessionLifeCycleDestroyer());
  context.register(Before.class,new RequestLifeCycleCreator());
  if (enableConversation) {
    context.register(Before.class,new ConversationLifeCycleCreator());
    context.register(After.class,new ConversationLifeCycleDestroyer());
  context.register(After.class,new RequestLifeCycleDestroyer());
  return new LocalMethodExecutor();
}
undeploy{
  TestContainer container=context.get(TestContainer.class);
  if (container != null) {
    container.stopContainer();
  ContextClassLoaderManager classLoaderManager=context.get(ContextClassLoaderManager.class);
  classLoaderManager.disable();
}
stop{ }
